#include "buttonPanel.h"
#include <QGridLayout>
#include <QVBoxLayout>

ButtonPanel::ButtonPanel(QWidget *parent) : QWidget(parent)
{
    QGridLayout* grid = new QGridLayout(this);
    QVBoxLayout* vLay = new QVBoxLayout;
    grid->setColumnStretch(0, 1);
    grid->setColumnStretch(2, 1);
    grid->setRowStretch(0, 1);
    grid->setRowStretch(2, 1);
    grid->addLayout(vLay, 1, 1);

    QPushButton* btnUndo;
    vLay->addWidget(btnUndo = new QPushButton("Undo"));
    connect(btnUndo, SIGNAL(clicked()), this, SIGNAL(clickUndo()));

    QPushButton* btnReset;
    vLay->addWidget(btnReset = new QPushButton("Reset"));
    connect(btnReset, SIGNAL(clicked()), this, SIGNAL(clickReset()));    

    QPushButton* btnBack;
    vLay->addWidget(btnBack = new QPushButton("Back"));
    connect(btnBack, SIGNAL(clicked()), this, SIGNAL(clickBack()));
}
